<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/task-themes-list.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
</head>
<body>
    <<!--div>
        <p><span id="count">3</span>秒后页面将自动关闭</p>
    </div>-->
<?php


//传递过来的页面信息。返回的时候，会根据这些信息返回原来的页面
$nowpageid      = addslashes($_REQUEST['nowpageid']);
$sortby         = addslashes($_REQUEST['sortby']);
$term_nid       = addslashes($_REQUEST['term_nid']);



//设置需要搜索的表格的前缀后缀
$table = $table_Prefix . "task_themes_list";
//设置需要搜索的表格的前缀后缀

//查询任务板块管理员
$info = select_one_line_all_items($table_Prefix."task_themes_list","name = '".$_REQUEST['ai_name']."'");

$error = 0;
$msg = '信息已保存';
if($info){
    $error = 1;
    $msg = '当前项目任务标题已存在';
}
else{
    $sql=insert_date($table,$_REQUEST);
    $query = mysql_query($sql) or die (mysql_error().$sql);
    mysql_close($con);
}




?>

</body>

<script>
    layer.alert('<?php echo $msg;?>', {
        time: 3*1000
        ,success: function(layero, index){
            var timeNum = this.time/1000, setText = function(start){
                layer.title((start ? timeNum : --timeNum) + ' 秒后关闭', index);
            };
            setText(!0);
            this.timer = setInterval(setText, 1000);
            if(timeNum <= 0) clearInterval(this.timer);
            //if(timeNum <= 0) layer.closeAll();
        }
        ,end: function(){
            clearInterval(this.timer);
            parent.location.reload();

        }
    });
</script>